module.exports = option => {
    return async (req, res, next) => {
        const modelName = req.params.resource
        req.Model = require(`../models/${modelName}`)
        next()
    }
}